11. AWS GPU Instance Preparation
Note: If you decided to use the Udacity GPU Workspace, you could safely skip this part!
Getting your cloud computing platform set up!
Why train in the cloud?
Depending on the size of your training set and the speed of your CPU, you might be able to train your neural network on your local CPU. Training could take anywhere from 15 minutes to several hours if you train for many epochs.
A faster alternative is to train on a GPU.
It's possible to purchase your own NVIDIA GPU, or you may have one built into your machine already.
If not, it’s easy (although not free) to access a GPU-enabled server (also known as an "instance") through Amazon Web Services.
As part of this program, we will provide you with up to $100 in AWS credits. Instructions to access these credits are below.
Let's run through the steps!
1. Create an AWS Account
Visit aws.amazon.com and click on the "Create an AWS Account" button.
If you have an AWS account already, sign in.
If you do not have an AWS account, sign up.
When you sign up, you will need to provide a credit card. But don’t worry, you won’t be charged for anything yet.
Furthermore, when you sign up, you will also need to choose a support plan. You can choose the free Basic Support Plan.
Once you finish signing up, wait a few minutes to receive your AWS account confirmation email. Then return to aws.amazon.com and sign in.
2. View Your Limit
View your EC2 Service Limit report at: https://console.aws.amazon.com/ec2/v2/home?#Limits
Find your "Current Limit" for the p2.xlarge instance type.
Note: Not every AWS region supports GPU instances. If the region you've chosen does not support GPU instances, but you would like to use a GPU instance, then change your AWS region.
Amazon Web Services has a service called Elastic Compute Cloud (EC2), which allows you to launch virtual servers (or “instances”), including instances with attached GPUs. The specific type of GPU instance you should launch for this tutorial is called “p2.xlarge”.
By default, however, AWS sets a limit of 0 on the number of p2.xlarge instances a user can run, which effectively prevents you from launching this instance.
3. Submit a Limit Increase Request
From the EC2 Service Limits page, click on “Request limit increase” next to “p2.xlarge”.
You will not be charged for requesting a limit increase. You will only be charged once you actually launch an instance.
On the service request form, you will need to complete several fields.
For the “Region” field, select on of the following regions: Oregon, North Virginia, Frankfurt, South America, Tokyo, Ohio, Seoul or Sydney
For the “New limit value”, enter a value of 1 (or more, if you wish).
For the “Use Case Description”, you can simply state: “I would like to use GPU instances for deep learning.”
Note: If you have never launched an instance of any type on AWS, you might receive an email from AWS Support asking you to initialize your account by creating an instance before they approve the limit increase.
4. Wait for Approval
You must wait until AWS approves your Limit Increase Request. AWS typically approves these requests within 48 hours.
5. AWS Credits
We provide all Robotics Software Engineer Nanodegree Program students with $100 in AWS credits to access GPU-enabled AWS EC2 instances to accelerate training deep neural networks.
To access your AWS credits, go to the 'Resources' tab on the left side of the classroom; there will be an 'AWS Credits' link to click on there. Click on the 'Go to AWS' button to request your credits.
Fill in the data for this page. In your AWS account, your AWS Account ID can be found under 'My Account.'
After you've gone through all the steps, you'll receive an email with your code. Use this code on the link provided in the email, which will take you to your account credits page. The email will be sent to the email address you entered on the AWS credits application. It may take up to 48 hours to receive this email, though it is much quicker in most cases.
NOTE: Even with the credits loaded into the account, be careful playing around and setting up instances. You will be surprised how fast fees can be racked up and how quickly your credits can disappear.
In the next part, we will get your instance set-up for the deep learning project!